<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/4
 * Time: 16:14
 */

namespace app\common\validate;

class ArticleCate extends \think\Validate
{
    protected $rule = [
        'name'  =>  'require|max:25',
        'pid' =>  'require|number',
        'id'=>'number',
        'status' =>'number|in:1,2,3',
    ];

    protected $message = [
        'name.require'  =>  '分类名字不能为空',
        'pid' =>  '分类错误',
        'status'=>'校验范围不合法',
    ];

    protected $scene = [
        'add'   =>  ['name','email'],
        'edit'  =>  ['email'],
    ];

}